using Webshop20.Domain.Catalog.Core.Products.Filter.InputContracts;

namespace Webshop20.Application.Queries.Messages
{
    public class GetProductsRequest : MessageBase, ICategory, IMaximumPrice, IMinimumPrice, IProducer
    { 
        public string SortField { get; set; }
        public bool OrderByDescending { get; set;}
        public int Page { get; set;}
        public int PageSize { get; set; }
        public int CategoryId { get; set; }
        public decimal? MinimumPriceValue { get; set; }
        public decimal? MaximumPriceValue { get; set; }
        public int? ProducerId { get; set; }


        public GetProductsRequest(
                                            string sortField, 
                                            bool orderByDescending, 
                                            int page, 
                                            int pageSize,
                                            int categoryId,
                                            decimal? minimumPrice,
                                            decimal? maximumPrice,
                                            int? producerId
                                            )
        {
            SortField = sortField;
            PageSize = pageSize;
            OrderByDescending = orderByDescending;
            Page = page;
            CategoryId = categoryId;
            MinimumPriceValue = minimumPrice;
            MaximumPriceValue = maximumPrice;
            ProducerId = producerId;
        }
    }
}